package com.bsb.base.common.config;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public enum Area {
	beijing     ("11", "北京"),
	shanghai    ("12", "上海"),
	tianjin     ("13", "天津"),
	chongqin    ("14", "重庆"),
	jiangsu     ("15", "江苏"),
	zhejiang    ("16", "浙江"),
	anhui       ("17", "安徽"),
	guangdong   ("18", "广东"),
	heibei      ("19", "河北"),
	henan       ("20", "河南"), 
	shandong    ("21","山东"), 
	hubei       ("22", "湖北"), 
	hunan       ("23", "湖南"), 
	jiangxi     ("24", "江西"), 
	fujian      ("25", "福建"),
	sicuan      ("26","四川"), 
	guangxi     ("27", "广西"), 
	shanxi      ("28", "山西"), 
	liaoning    ("29", "辽宁"), 
	jilin       ("30","吉林"), 
	heilongjiang("31", "黑龙江"),
	guizhou     ("32", "贵州"), 
	shangxi     ("33", "陕西"), 
	yunan       ("34", "云南"), 
	neimenggu   ("35", "内蒙古"), 
	gansu       ("36", "甘肃"),
	qinghai     ("37","青海"), 
	ningxia     ("38", "宁夏"), 
	xijiang     ("39", "新疆"),
	hainan      ("40","海南"),
	xizang      ("41", "西藏"), 
	xianggang   ("42", "香港"),
	aomen       ("43", "澳门"),
	taiwan      ("44", "台湾"), 
	dalian      ("45","大连"), 
	qingdao     ("46", "青岛"),
	ningbo      ("47","宁波"), 
	xiamen      ("48","厦门"), 
	shenzeng    ("49", "深圳");
	
	private String id;
	private String name;

	
	
	
	  // 普通方法  
    public static String getName(String index) {  
        for (Area c : Area.values()) {  
            if (c.getId().equals(index)) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
    
 
	
	public static List<Area> getList(){
		List<Area> list = new ArrayList<Area>(Arrays.asList(Area.values()));
		return list;
	}
	
	private Area(String id, String name) {
		this.id = id;
		this.name = name;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
